#include <hxcpp.h>

#ifndef INCLUDED_jax_JArray
#include <jax/JArray.h>
#endif
#ifndef INCLUDED_jax_JValue
#include <jax/JValue.h>
#endif
namespace jax{

Void JArray_obj::__construct(int len)
{
{
	HX_SOURCE_POS("Source/jax/JArray.hx",11)
	this->length = len;
	HX_SOURCE_POS("Source/jax/JArray.hx",12)
	this->arr = Array_obj< ::jax::JValue >::__new();
}
;
	return null();
}

JArray_obj::~JArray_obj() { }

Dynamic JArray_obj::__CreateEmpty() { return  new JArray_obj; }
hx::ObjectPtr< JArray_obj > JArray_obj::__new(int len)
{  hx::ObjectPtr< JArray_obj > result = new JArray_obj();
	result->__construct(len);
	return result;}

Dynamic JArray_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< JArray_obj > result = new JArray_obj();
	result->__construct(inArgs[0]);
	return result;}

Dynamic JArray_obj::iterator( ){
	HX_SOURCE_PUSH("JArray_obj::iterator")
	HX_SOURCE_POS("Source/jax/JArray.hx",19)
	return this->arr->iterator();
}


HX_DEFINE_DYNAMIC_FUNC0(JArray_obj,iterator,return )

::jax::JArray JArray_obj::ofArray( Array< ::jax::JValue > arr){
	HX_SOURCE_PUSH("JArray_obj::ofArray")
	HX_SOURCE_POS("Source/jax/JArray.hx",15)
	::jax::JArray n = ::jax::JArray_obj::__new(arr->length);
	HX_SOURCE_POS("Source/jax/JArray.hx",16)
	n->arr = arr;
	HX_SOURCE_POS("Source/jax/JArray.hx",17)
	return n;
}


STATIC_HX_DEFINE_DYNAMIC_FUNC1(JArray_obj,ofArray,return )


JArray_obj::JArray_obj()
{
}

void JArray_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(JArray);
	HX_MARK_MEMBER_NAME(length,"length");
	HX_MARK_MEMBER_NAME(arr,"arr");
	HX_MARK_END_CLASS();
}

void JArray_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(length,"length");
	HX_VISIT_MEMBER_NAME(arr,"arr");
}

Dynamic JArray_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 3:
		if (HX_FIELD_EQ(inName,"arr") ) { return arr; }
		break;
	case 6:
		if (HX_FIELD_EQ(inName,"length") ) { return length; }
		break;
	case 7:
		if (HX_FIELD_EQ(inName,"ofArray") ) { return ofArray_dyn(); }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"iterator") ) { return iterator_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic JArray_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 3:
		if (HX_FIELD_EQ(inName,"arr") ) { arr=inValue.Cast< Array< ::jax::JValue > >(); return inValue; }
		break;
	case 6:
		if (HX_FIELD_EQ(inName,"length") ) { length=inValue.Cast< int >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void JArray_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("length"));
	outFields->push(HX_CSTRING("arr"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	HX_CSTRING("ofArray"),
	String(null()) };

static ::String sMemberFields[] = {
	HX_CSTRING("length"),
	HX_CSTRING("arr"),
	HX_CSTRING("iterator"),
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
};

static void sVisitStatics(HX_VISIT_PARAMS) {
	HX_VISIT_MEMBER_NAME(JArray_obj::__mClass,"__mClass");
};

Class JArray_obj::__mClass;

void JArray_obj::__register()
{
	Static(__mClass) = hx::RegisterClass(HX_CSTRING("jax.JArray"), hx::TCanCast< JArray_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics, sVisitStatics);
}

void JArray_obj::__boot()
{
}

} // end namespace jax
